Changed the view to load correctly instead of calling JS.
Also got rid of some no longer used html.
Put repeating code in its own html file.
This reduces the amount of repetition.