mixed mode: configurable history length
improve test scripts
minor improvements