Updating documentation, refactored logging