Refactor - Move duplicate code to a parent class

All the Table_Stats_* classes had lots of code duplications and I re-factored this code duplication by adding a common parent class and moving the common code there.