fixed matrix:set_data to return matrix object; filled docs with all function definitions