Added few tests and cleanedup existing thread examples
Refactor and cleanup in Threading Examples