Tried to implement a better, more detailed, documentation for each of the developed functions.