Config mananger

Implemented config manager, fixes #1