Web interface: refactor for profile support. Refs #2958