Refactor to use destructuring.