Adding and modifying Dynamic data examples

Some examples have been added or modified (with error treatment and
freeing memory)