fixed ifelse, added lots of plotting
updated docs, fixed rand bug in for randarrays, added vis functions