Refactor unused code.