Got rid of the stupid redundant malloc/memcpy