Make threaded and a bunch of misc changes
Add threaded graphical updating and simulating