Better table organization and some performance improvements