Fix error messages.
Fix construction by ClassName().
Add metamethod support.