fix cor, checks e refactor foto