Actually dynamically allocating terminal buffers
Dynamically allocating input buffer