Major overhaul of Python interface - multiple replicas running in parallel.