Refactored into an array of hashes