Better class handling