Submitting a pull request for Ian's code.