Features and fixes

Closes #5, #6, #10, and #12. See commit log for more info.