One of the most important problems of coding theory is to construct codes with the best possible minimum distance. In this correspondence, we further generalize the method first introduced by Gulliver and Harada and later generalized by the present authors, and obtain new linear codes which improve the best known minimum-distance bounds of certain linear codes. We have found eight new linear codes over F-5 with improved minimum distances. We introduce a generalized version of a Gray map, then we give definitions of quasi- and nearly quasi-cyclic codes. We conclude by giving the parameters of new linear codes with their generator matrices.