Restructuring
Added emulator.cpp