Adding some documentation to the code.