general update and cleanup