Added more comments

Described the variables in more detail. I also tried to make the code
more readable