Cleanup of master