Remove n+1 queries from main page