Ajit, Gaurav| threading test is written, and whole codebase is refactored