Core: refactor update directive (#715).

See #715.