Remove singletons. Refactor. Add Entity class