Fix hwclock script. Minor other changes.