Add support for config file, cleanup