improvement of comment rendering in js