webapp refactored