Adding config file params and cleaning unused code