Made vector arith more general; added replication for vectors to mimic matrix/vector arithmetic