Fix namespace and some other issues.
Fix entity repository typo.