Added tons of comments in the code.