Fixed spelling mistakes and added a few comments