Refactor code.