Add support for redundant table format; Some refactoring