IN/OUT administrator  'merge anibal:angel' - ref BT#8566

Commits merges (angel, anibal)
All functions should be located in a separate file in main/inc/lib/ or re-use existing functions!