decoupled config and implemented a singleton for handling it