Small refactor to support API table creation