Added test suite and fixed found bug in nub