Closes #39, #38, and #41

Please see my notes in #39.