fix broadcast issue

added precomputation
refactor broadcast bricks
replace object with string matching
smarter precomputation

added regression tests

improve performance

Fixing tests and refactoring