Merging from public upstream

The master branch is out of date and has failures from the models. You can either merge my pull request or do the same :)