Some code review for your project

Made some changes and added some comments, let me know if any of them don't make sense!