Removed tmp buffer, halving transient memory needs