Fixed roster sorting and added tests