Added unit-tests; resolved issue #5