Refactor code. Add description for each step.