Almost finished store pruning / garbage collection. Need more fixes to
get them work.