Issue #2100329 by cosmicdreams: Use \Drupal instead of Drupal to make IDEs and static code analyse tools happy.
Issue #2028499 by tsphethean, damiankloip, dawehner: Drupal_sort_weight() should be converted to a class.