Deleted some old unused interfaces. Refactored simulator code.
Unit tests for simulator.