Merging in new code from @jlr9he to master