Moved a couple of things around and added nicer debugger messages.