Apply @andrewsmedina's suggestion and improve tests
Merge pull request #1 from scorphus/update

Apply @andrewsmedina's suggestion and improve tests