Added random to picking, fixed a few bugs