Better processing of vectors/matrices to allow for K=1
Better simpler plotting