Modified BW slightly.  Started adding tests.