Adding maxBuffer property to allow overriding the buffer