Finished distinct' and distinctF StateT functions