Move utilities into a separate module