Template and view fixes