getMaps simplified, matrix2mv function added