Fix get_profile, move utils to utils.