We investigate extending a chosen block or convolutional code which has additive error correction capability, as predetermined by the usual communication systems or coding considerations. Our extension involves constructing a template to add additional redundant bits in positions, selected to balance the moment of the code word. Using some number theoretic constructions in the literature, insertion/deletion correction can then be achieved. If the template is carefully designed, the number of additional redundant bits for the insertion/deletion correction can be kept small - in some cases of the same order as for Hamming codes. Our construction technique can also be used for the systematic encoding of number theoretic codes, and furthermore have implications for other coding techniques utilizing the moment function, such as codes correcting asymmetrical errors, spectral shaping codes, or constant weight codes.