Refactor application helper