Fix incompatible pointer type warning and enhance the comments a bit. This is the last commit for this branch.