some refactorings; also remove the conditions that there must be exactly 1 comment