Fix logging and add better documentation