Minor cleanups
Implemented random sequence and random effect insertion.