Added rand vector sources and some fixes