Added a tertiary thread to run engine.  Still buggy.
basic simulation works
forgot to clean