Make DataTypeService an interface

While at it improve the internal implementation of the default
DataTypeService.