Use class name when inside of a module. Fixes #50

Does this make sense for a fix for #50? I think its fair to assume that the class name should be used for the entity, since it looks like colons are banned in entity names?