Remove explicit heap allocs. Remove scratch code.