Implemented first version of dependency injection

DI works but still needs to be expanded for better singleton support.
Comments removed