clean up scope impl a bit