Removed unnecessary comments
Fixed index out of range error