define setImmediate function
merged some functions into indent/unindent
changed appendText and appendLine
removed nodeInserted event
some minor fixes