Removed history_length from local config; using NULL safe vector operations