Change sort representation to class (do not review yet)

Testing...