Use whitespace array for deleting keys to generate optional attributes
Extracted non namespaced attributes out into method