Add View tests
Clean up code base