Fix the db-access and transform layers