cleaned up code, preparing for release