Put configuration in an own file and bugfixes