Refactored Business Logic into a separate class