Use a constant for buffer lengths

Scary magic numbers