Refactoring of web-app