Merging files from https://www.drupal.org/sandbox/avguy/2197915