Removed unneccessary cpu usage from Pane#getExitCode and created temporary ThreadLocal class.