merged a bunch of rough code ... more work coming.