Remove some singletons and adjust tests