Remove legacy code from core lib
Add one-time listeners