Fixes for symbol collisions in add-patches-section and cleanup

Plus some cleanups and adding a TODO