Tweaking simplify
Table reference replacement now returns symbolic errors
Refactored replacing ranges with array literals