FIxes #3

I also incorporated the patches already submitted, though those users should get credit for their individual commits in the master branch by pulling those first.