Code cleanup, re-org

Added topRow and bottomRow templates to break up main.  Reorganized js
files.