Fix failing tests because of static variable
Improve tests and coverage
Merge pull request #494 from ayushchd/unit_testing

UTs:  fixes and improvements