Added service and repository layer