Update to simplify code.