Cleaning and updating code

Cleaning and updating code