edit cleanup and setup