Clean, comment, refactoring code