Refactoring.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>