Add some solving code and auto run support