code cleanup a bit.