Minor code cleanup and updated code comments