Moved new table logic to globallibs. #1260