Minor optimization of table loading

Is both faster and more memory efficient.
Further optimize table loading

Again, both faster and more memory efficient