Moving default query to the repository