Fix construction of new class

* use array to build class list
* initialize array within loop
* use regex to check item and only add classes for letter characters