Code clean up in preparation for release