Restructured the logic: Used OOB Magento layout update tables instead of custom tables.