Merge pull request #10 from maxburkhardt/rewrite

Merge in rewrite branch