cleaned up code and packaged config