Improve edit mode