Fixed tests for previous commit
Improved the way to load metadata for a single class

There is no need to load metadata for all classes in this case.
Replaces #152