refactor comments and order in code