Simplify
Adapted to newest libs
Use mutable instead of ugly const_cast
Name refactoring