use singletons instead of statics, rework code