Placing random under namespace - to resolve possible naming conflict
Adding missing typedef definitions