config refactoring [closes #45]