Major cleanup, added config file.