Added many comments to the project. fixed some code.