Move sorting functions to Book