Classes preserved in SVG output and a bunch of cleanup

-A lot of cleanup as discussed in emails and #62 (commit 047830b)

-Readings selected using the xpath input are now preserved as class names. There is support for nested readings as well, though as I'm writing this up, I'm fairly certain that's impossible with the current means of xpath input. If you want me to change this to a single extra class, let me know.

More information on how this works in the notes for commit cd6265b.
Can we access any element on a stack? If now, I think we would need to go back to a list because we will want sometimes to access element lower on the stack. For example, for improving the beam structure in the SVG (see issue #58 )