updated classes structure and automatic tables