Refactor. Remove redundant code.