Moving conversion funcs to separate file