Updated the front end, added some comments to the backend code