Move out singletons and separate into files