Created Username class
Moved all trimming and htmlentities conversion to factory