Uses queries for creating booksOnly graph

Runtime down from 14 minutes to 6. Still has some problems tho