Add random() method to core, update cookie component of core