Started work on entity refactor