cleaning up code still figuring out singletons