Use destructuring to simplify code.