Added multiple sorting possibilities and defined an extensible module for defining new sortings