Adds options for  and  nodes. Also adds (brittle) tests.

This is in response to #1 by @jmarceli.
The code is simple enough, but not very pretty. I also wrote some admittedly overly brittle tests, but it's a start.
Feel free to ask me about any non-obvious changes.