more unit tests and fixed bug in class existence check