seperate out imports and tidy a few un-necessary optimisations
make some corrections to comment
pull out the input processing out of the parser class and a few small improvements - the no js option now applies to all js, including that within quotes. The Javascript node now also returns the right index.