Fix exports and hlint warnings
Tried to implement distinct sampling using tables, but does not terminate