Merge in changes from @jspillers