Adding more unit test and added some comments