Transform and wrap context