Fixes, more config functions and better logging