Code improvements
Adapted to new class
Adapted to new class