I manually added all of Luke's changes to the most recent version of the code, closing
Luke's pull request now.