Refactoring web application