Moving some things into utils