add views tests
edit view syntax
clean up code