emulator program to support new directory structure and some code cleanup and
refactoring.
Change-Id: Ib3cf5c0123cd87497517d4221edea5883db9157d
Former-commit-id: 2c4acfec0b [formerly ae75638063 [formerly baaefbd38040c69ba42feaa8b00e8ca4d69f4ba1]]
Former-commit-id: ae75638063
Former-commit-id: 4702fd8a72