Adding maxBuffer property to allow overriding the buffer

Fix for #20