Rearranged BEM script a bit