Added a bit more logging and a few other changes