added trace resetting and re-using of reset traces
added checks to see whether the engine is still running to prevent
movements that should not be made