Use dependency injection instead of singletons