started to move stuff to unfinished emulator and remove stuff
Added reference implementation