cleanup and build