cleanup and comment improvements