Moved mole element name creation out to a function

Realized it was a DRY issue, and if I change the element name  later, it would be a headache (albeit a tiny one).