Improved test suite.
Fixed assignation of metaclass (fixes #39).