Add frandom

This is a better implementation than I had previously.