Cleans up inputted hash data with Ruby