Solver now uses thread-safe data structures to reduce locking and cloning