Move set_prefix method to helpers.