Minor cleanup and improved comments