vast optimization changes from profiler
HUGE OPTIMIZATION CHANGES!! (vectorised Qmatrix)