Moved QueryBuilder queries to the repository to enable public ids
Disabled debug log
Added redis timeout
Fixed the id queries. Eventually closes #530