Desingletonize InputDirector and fix memory problems.