Move hash conversion to end for readability