Added bugfixes and config file template