General cleanup of flag code.  Added spout proxy to address issues with STORM-368.
Merge branch 'Storm-368-fixing' into Squeal-trunk