* refactor comment view
* fix issue with wrong file index in comment view
* outsource loop callback