Move the SymbolicCalculator to AMD directory. Add basic exceptions to SymbolicCalculator. Fix some bugs related to the previous merge.