Created custom repositories + code refactor