optimized some queries with select_related and prefetch_related. Huge improvement.
Merge remote-tracking branch 'origin/master'