Fixed spelling mistakes and added comments