Updated some view functions to classes