web: Light restructuring
web: Replace some helper functions with decorators