Merged upstream changes in from original boilerplate