Move big view functions to their own files