Modified tests. Lib fixes