bootstrap and unit testing

This merge should allow us to do some nice unit testing with nosetests as well as slightly change the way that handlers and hooks are registered.