Initial commit of (possibly) finished hw1 code.  Needs testing.