Commented some Functions

Commented some functions to help understanding.