Moving some utilities here