Refactored into webapp