Modernize scopes

* Use lambdas for all scopes
* Updates to stabby lambda syntax for the concerned files