Fixed some issues with Solver class

Still need to fix negative direction moves.