Update webapp.py

better modularized. (for inserting selection tags)