Here is a 5X12 (just smaller than 5X12 actually) layout design to consider. If you are determined to use your O-31, you could look to shrink the inside route from the current design. But my experience and recommendation is to go with larger diameter when you can - even though your trains may run on O31 or O27, they will look better on wider diameter curves. Something to consider anyway.
Another version of the same design, but slightly stretched for the full 12 feet.: