code cleanup and finalization rolit move logic