Brian's late bugfixes
Merge branch 'master' of https://github.com/manotaur/ydh2s

Merging Brian and Dave's bugfixes