refactor(task): Refactor code for readability