Fix reverse call.
Added solve function and fixed subprocess generation.
Added database queue based mechanism for running the solver