cleanup and preparation for release