Merge pull request #16114 from SmithSamuelM/2014.7_sam4

Refactor application kind Also clean up routing logic a little