Unused code removed.
Member variables initialized.
Out of bounce read fixed.