Refactor when class are called