Added some const reference parameters and comment strings.