Fix name normalization function

Name normalization should differentiate between class names and property
names to avoid name collisions and resulted compilation errors (issue
#129)