broke code into separate files, changes to maintain line number parity
reworked html text output and line parity
fixed lots of line parity issues, newlines escaped with backslash, updated tests