Move orientation widget code to frame