Webapp refactor beginning