Reduce SQL queries on competition detail page(fixes #67)