Refactored real work into separate classes