added more robustness in how classes can be added and configured