This case statement seems to cover too much.  I see a lot of duplicated code in the else.