WIP: Updates to mcsolver

- Attempt to optimize the mcsolve algorithms before an eventual move to cython.