Cleaned up code, implemented Commands and Singletons