Update comments and rename function name