refac, added interfaces, created encapsulation of tables, document, and spreadsheet