Updated code to add documentation.