The racetrack model magnet (RMM) is a racetrack test magnet being developed at CERN. Its main goal is to demonstrate, in view of future high field accelerator magnets, that a nominal field of 16 T can be reached in a 50 mm bore, with margins and limited training. This paper presents a 3-D magnetic and mechanical study and proposes solutions to achieve a peak field in the ends lower than in the straight section, while containing the electromagnetic forces. The structure features tie rods and end-plates, which have been designed to provide an adequate support to the coil ends, in different loading configurations. In particular, the impact of different materials and the role of friction have been studied. Different solutions are compared and a final design is proposed, which offers the best compromise in terms of magnetic and mechanical criteria.