Revert "Revert "Merging in changes by @GromNaN. Resolves #84.""

This reverts commit 3d57d9784173b395511a1aee15483bf69b39893d.