moved some things around and changed things to use the config file.