Refactor of repository, mainly __call and find* methods