optimized unique check + better exception message
fixed clear - if two classes begins with the same name