Refactor table for multi-format support.