minor hash pruning mods and major Python additions