Added a fair amount of comments