split program into aui, ais and sharedfuncs