Fix bug of class and styleless textnode handling introcuced in last commits,
Optimize