Seperated Enviroment variables, tweaked thread creation/disposal