Refactored how UI is tied to controller logic