integration and cleanup