Updated 4.0.0 rewrite against 3.0.8
Merge pull request #22 from johnewart/4.0

4.0.0 rewrite against 3.0.8