Log and fix

Bunch of changes