code cleanup and comment style changed