It seems that the below code could be cleaned up a bit.  Is it still necessary at all?