some code update and cleanup

Signed-off-by: makidelille <makidelille@hotmail.fr>