Refactored entities.
Foreign keys start.