Fixed and added some comments