Initial somewhat-useful code.