Added comments to all the methods.