Got rid of minimongo query in a inner loop. This helps performance immensely.