Added multiple test cases in KThread. Improved commenting and cleaned up
code.