Misc changes

Squished bugs with the return value of transformDocument, code style
cleanup, improved comments, refactored a few functions, fixed bug in
isEmptyLike returning inverse for leaves per the policy, broke apart
some larger functions and logic into smaller functions for clarity,
improved special characters analysis, some better variable names,
deprecated some selectors and switched to using NodeIterator in a few
places, fixed isInline function
Minor changes
Fixed how calamine results are piped to render