Refactors names and tables to match latest ORM entities.