Switch to stl smart pointers
Add a thread for simulation update