fixed various externs, class abstractions