Addresses #9 and #14, with a quick change to help out #40.