Rewrite
Merge pull request #15 from ShadowNinja/master

Rewrite.