remove comments. rename some veriables. remove Buffer class