The library has unnecessary heap allocations and `clone()` calls which should be cleaned up or refactored.