This changes are on top of what already done by @ffabiano in MR !1122 (merged)
cc: @rangel, @qiuchan @pheinnog @philten