Changes and fix tests