Minor refactor; Adds controller tests