Add some comments and change a few names.