cleaning-up and refectoring (as a follow-up for the change of mantis
3546)