Refactor: simplify code.