Key pool + other memory/performance improvements