Refactor and speed up graph data generation
Implement results count limit
Resolve merge conflicts