Removed unused variable.
Made more DRY by having initialize call append(List<Double>)