Added matrix -> vector conversion.