A hierarchy of ramified theories below primitive recursive arithmetic