Added local terminate flag in smaug to assure nothing is run after shared terminate flag is set, added terminate check in sheep
Added threading version
Added threading version