rating for multiple content types
makes top rated work for arbitrary content types
sanity checks as assertions and remove d(...) debug tracing code
makes latest work for arbitrary content types
fix get_rank