Code simplification by implementing structure to reduce nb of argument in functions