With the help of resolution of the identity (RI) a compact representation for the zeroth-order (ZORA) and infinite-order (IORA) regular approximation Hamiltonians in matrix form is developed. The new representation does not require calculation of any additional molecular integrals, which involve an auxiliary basis set used in the RI. The IORA computational scheme is modified in such a way that the erroneous gauge dependence of the total energy is reduced by an order of magnitude. The new quasi-relativistic method, dubbed IORAmm, is tested along with the ZORA and IORA methods in atomic and molecular calculations performed at the SCF and MP2 level