Some view and template improvements