Adding comments

Working out a description of the functions