Modified code to match all other source changes. Slowly moving all markup and logic from JavaScript to the Controller.