code cleanup and comment tweaking