Pull @navrocky's changes

Pulls request #48 from upstream into this respository because it is needed to continue our work.