Implement logging and comments