implementation of design changes proposed in https://mantis.phplist.com/view.php?id=17449
Merge pull request #2 from mariez/master

#17449 - implementation of proposed design changes