Improving robustness (reentrancy) and test cases.