Added safe objectAtIndex method to NSArray.
Widget class now works with initWithFrame