Cleanup logic, code, make easier to read, flag variables step by step