Add function to convert between old and new hash syntax