Editor activity cleaned up. Variables refactored and javadoc added.