Added if statements for method stubs and array setup