Updated comments and function headers.

Added source code reference, updated function headers.