Refactor: docs and logging mostly