implemented submatrix(), more to fix

all functions directly accessing .baseArray should be fixed to work
properly on submatrices