Dynamic class handling