refactor web app