Classes lesson refactor