Various fixes, and changed log to info rather than debug.