Initial commit
Now updating current thread pointer when changing thread