Moved parsing functions to Parser, modified Solver.