Cannot get MacroLibrary inside widget?

can you do functions instead of macro? ie single exec path.
If so create function library and make functions.
Also widgets are not meant to have complicated code, and they pita to communicate with parent of a parent etc.