MiddleLayer e Rest