Getting rid of singletons and optimizing imports