Final version with almost no comments
Final version with comments.