implement initial DI Container, fix memory leak on EventDispatcher