Adds config and clean up