Make input and buffer limits configurable (closes #27)