Implemented prototype of Simulator + moved some code