The first thing to do with any rifle that is not grouping is to check the bedding. Most, if not all factory rifles could benefit from a good bedding job. If you do not like the stock the rifle is in this is a good time to buy one you like. A premium stock like a H&S, Stockade or McMillan is an excellent investment and will be appreciated even if you have to do futher work latter on to achive max accuracy. If a barreled action is placed in a rigid stock with a stress free bedding setup it can shot as good as it is going to.
If it is still not drivng tacks like you want it to the next step is to look at the barrel. The barrel is the heart of any rifle. Again money spent on a premium barrel is never wasted. A premium manufacter like Hart, Douglas, McGowen, ect. is the way to go. This is not an area to save money if top accuracy is the desired result. However, as it has been pointed out here already the selection of a rifle action to build on is an important factor. With every action I have rebarreled I have taken the action to a gunsmith and had it throughly checked out and tuned.
Factory produced rifle actions benefit greatly from having the action trued and squared, the bolt lugs lapped and bolt faced squared. Then when you have the barrel installed you get the max your action has to give.