revise some comments and replace tabs with spaces