Refactored comments and code