Got rid of manual buffer allocation/delete