Code cleaning and updated documentation.