Refactoring

Refactored much of the code.

Simulation models can now be created by inheriting the Simulation class.