Refactor and update helpers