Settings added to view, some JS simplified.