start of support for table storage and refactoring