lots of little cleanups to the sax handler, test to ensure it handles processing instrs and xmldecs correctly