Fixes DEVELOPER-482

Adding some extra JS code to make sure things stay sorted, and also to
remove duplicates. I'm really not satisfied with Google's Book API, it
leaves a lot to be desired IMO.