Code move, refactor, updates app hook

Easiest to check changes in the 2nd and 3rd commits.  All set up for the data part of things; will work on that soon.