Clean this up a bit.