Load settings $scope before children

Keep things consistent with existing code base, for all if blocks, no one-liners and space between closing parens and opening brace:
e.g.
```
if (upload !== null) {
    $scope.setSidebarCheckmark('realtime', valid);
}
```