Tests and fixes related to key creation/deletion and memory usage/performance.