Fix column names of pg matrix table + better factory for quadrant