Fixed some issues.

Specifically, issues #7, #3, #2.