Initial stab at a cleanup.