improve metaclasses, metamodel, and generators

Added 'meta' module to refactor metaclasses.
General improvements of generators and metamodel elements.
Updates to tests.