Added buffer class.
Minor changes ...