Refactor singletons