Optimized for size
Fixes based on Mathieu's review
Merge pull request #73 from harlequin-tech/master

Save a another 200 bytes of code space.