Code Refactoring and setting up the simulator for console and gui mode.
configManager is a Singelton now