refactored blockscope handling into a blockscope singleton