Moved constructor to container.
Removed obsolete ClassMetadataFactory.