Added randomization options
Added trial structure to simulation