Squashed commit of the following:

Fixes #181