Closes issues #1, #2.