Fixed code according to the last interfaces updates + fixed tests