Add set view functions and tests