addition refactoring, minimizing public interface, couple more tests