Initial workings of matrix library