Remove unnecessary dependency on DocumentManager

This commit removes all references to DocumentManager,
since it was only used to get a reference to the current document,
which can be obtained via
`EditorManager.getCurrentFullEditor().document`.
Simplify execution logic

This commit removes the switch-statement
and replaces it with an if-statement.
Make indentation more consistent
Merge pull request #5 from sbruchmann/refactor/cleanup

General code clean up