Improved readability and improved comments based on review feedback.