FALCON-581 merlin: Refactor code for cross product and make it a method. Contributed by Raghav Kumar Gautam