Added items to config file and cleaned up the code