Refactor camera controls in editor
Properly close editor.