REFACTOR es scripts