Some fixes
Better clean up the domains array, fix broadcasting issue
Fix all specs