Optimized prolog code loading.
Some type conversion in avg methods.
Working q3 with avg > 5.