Lib and tests updated