Fix some bugs and collisions among class names.