added class system to batch_tables and encoding functionality