Updating the functions in the LIB to save the variable values in each update of the map list

WARNNING: It is not working, sorry about that.

Signed-off-by: Herbert <herberthb12@gmail.com>