more template cleaning and fixing error in entry views