some comment and code cleanup