This is, what should be, a working copy.  Will run more thorough tests later.