KRACOEUS-7766,KRAFDBCK-9487 - This fix has got unit lookup for Agenda an...

This is to fix the ordering of Agendas gets applied by looking at the Unit Hierarchy. It also has the fix for having a unit lookup with Agenda
remove commented out code