Continue refactor of UI.

Directives must have parent controllers functions passed into the element.
Fixed a few other issues I ran into.

Actual UI will be redesirned after all the bugs are fixed.