Added basic err handling code, fixed concurrency stuff, improved Rakefile