Web UI: clean up code. Refs #2958 #1984
Web UI: add custom categories. Refs #2958"
scripts and templates: implement custom categories. Refs #2958