Upgrade code to new hash syntax