Refactor usermask to username parsing