Comments on latest changes for VIP

The purpose of this pull request is simply to provide my line-by-line comments on the areas where VIP might ask for changes. If these are addressed proactively, it may speed up the process.
Should sanitize all the $_POST values in this function before using them.