Remove N+1 queries and add newrelic.yml