Add a rakefile to run the tests automatically
Optimizations
Stolen from @zenspider
General cleanup