Moved the DataTypes out into its own class so we could remove the circular dependency between different classes and RestApi.