Improved code comments and organization