Refactor to allow for premade PID and table name columns