Refactor domain entities