Hh refactor

Nice work.  The things I modified were relatively minor -- adding a uniqueness index, renaming migrations, refactoring specs.  Take a look at the commits to see the full changes.