Fix random distributions, clean up unused vars