Implemented configuration file + minor bug fixes