Replaced SubstitutionMap with FlatTermMap because I plan to make a better implementation of SubstitutionMap using FlatTermMap
Improved solver: combined reductions with open rules into a single structure. The solver also takes into account reductions in the 'Step' function now.