Cleanup positioning and state changes.