Refactored Added service layer