Pursuing OO approach rather than static library. Added test case.