Feature/updatemetadatas

@jesuspg
I do not like to have several return's in the same method, it is not clear to follow the execution of the logic.