Added parameters, config file, and some minor code improvements.