More work on StateT - and I haven't fixed that hang in distinct