Separating view and controller