more cleanup on layout/template