Refactoring to abstract class style and extracting the table creator functionality into separate helper classes.