Adapted to newest libs
Minor progres