Removed relational model and replaced with metadata model where needed.

Updated related code and tests.
Where is this class used now?