Merging Dan's changes into mine so we don't have pull request issues