refactored environment, fixed safe mode crash

crash caused by NCHax’s -release of defaultWidgets right before using
it in +arrayByAddingObject