added tests for views, and implemented fixes during testing