Refactor DataLayer using a new DataTransformer

Start the refactoring of the datalayers to avoid data transformation
code duplication. So far, only DataLayer has been done.