Add query opts and populate.
Fix global leak.
Merge pull request #67 from Battlefy/feature/query-opts-and-populate

Add query opts and populate.