Use simpler local random function
Fixed oversampling problem, by fixing the indianess
Better per-platform caching, up to final closure