Final Final Code

Added inline comments to functions.