Here's what I did on my O'Day 22 ...
Just below the halyard cleats near the bottom of the mast, I attached two cheek blocks, slightly forward of abeam, one for the main and the other for the jib halyard. On the cabin top, I mounted two single-line Lewmar Small rope clutches, one on each side of the main hatch. They are mounted at such an angle that when the halyards come out of the cheek blocks, they shoot straight back into the clutches. I also had to downsize my halyards from 3/8 to 5/16ths so they would fit the clutches. Even if the old halyards would have fit the clutches, they weren't long enough to run back to the cockpit.