Sim core

The simulation core is now complete and ready for review and merge. Go get it!!