remove some uneeded scoping code