Refactored activity editor.