main rewriting application imports
quite a bit of rewriting
Merge pull request #3 from pythonhackers/rewrite

Rewrite