Extract logic into a class