Fixes #21

Actual meat of changes was last commit though