Merge "Optimise the hit test algorithm" into nyc-dev