Update syntax and refactor.