Expanded code comments throughout