Refactor entities & change entity format from annotation to yml