service layer and delete unnecessary files