Framework events and config update, code optimization