Refactored Simulator for cleaner code and thread-unaware implementation. More cohesion.
Changed indent style to spaces only, in stead of tabs only.