Some minor additions to the API.

I'm troubleshooting in lib/reference.js right now, so this isn't nearly as much
progress as I wanted to make. Tough day.