Text this: Group divisible codes and their application in the construction of optimal constant-composition codes of weight three