Clean up scoping.