Made theWord export start to match sample version, plus a few small bug fixes.