regroup debug functions + add secured in operations + fixes
merge