Minor changes and more unit test