Remove duplicate code

Signed-off-by: Fred Bricon <fbricon@gmail.com>