Fixing Q function, it looks way better now. Time to experiment weeee
Merge.