Added som more unit test, small refactoring unit tests