Cleaned up controller by adding helpers