Reverted log-message function to previous version and documented some other functions.