Styling fixes.
Made the selection logic more generic.
Minor: JSHint.
Somewhat buggy integration of the newly added views with the header.