Renamed variable
Removed config file, added makeConfig function and better error handling