refactoring, singletons, observers, state