Set parent before render

Allows the child view to have access to the parent when rendering so the
child can more easily bind to events on the parent. Alternatives include
manually passing in the parent view when initializing the view (which is
redundant) or having the parent setup the child view's listeners.

Included some whitespace and syntax cleanup for in the files that were
modified, but in a separate commit from the change in functionality.