Clear widget code and add dependency test