lots of warnings and 1 error I can't figure out.  Also need to test it.  But this is most of part 1