Rewrite!

Second commit of the rewrite branch (after the .gitignore)