Move utilities into a separate file.