fixes for layout issue and remove anymous function from comment template function