tableFactory - OO design for table creation

New approach for tables - now using factory design pattern, tables can
be created using this new class. Still needs to be integrated into
existing code but should reduce code size and redundancy once done.
Limitations: prints out all headings and rows in order of the array
passed in, so is heavily dependant on input already being processed.