Better logging and more docs