We analyze two branches of five-dimensional theories from a methodological point of view: Kaluza’s theory and the Klein-Fock-Rumer (KFR) 5-optics, aimed at a geometric description of electromagnetism and masses of elementary particles, respectively. These two theories have a number of problematic points such as the Planckian masses in Kaluza’s theory, or appearing of a configuration space in the KFR scheme. We propose a simple six-dimensional toy model of Kaluza-Klein type with compactification on a two-dimensional torus T2, which demonstrates a possible way to overcome these difficulties in quite a simple manner. The key features of our approach are: merging of the above two 5D theories into a unique 6D theory; using the signature (+-) of extra space allowing one to renormalize the mass spectrum; and a special kind of truncation of the full isometry group to the electromagnetic gauge group U(1). The latter feature allows a geometrical interpretation in terms of an effective 5D theory on a hypersurface Σ ⊂ T2 being a leaf of a linear foliation of the 2-torus. Possible consequences and open questions arising in such a scheme are briefly discussed. © 2019, Pleiades Publishing, Ltd.