Optimize context object access (all in one). Clean and correct actual code.