Thombrg master

separate branch to merge previous pull request and resolve conflicts resulting from subsequent commit.