Transaction locals

Implement transaction locals.