a little more cleanup to make this ready for npmjs