config refactoring and docrootfix