ListBuffer to an Array
Initial refactoring