Is this duplicative code?  Also, nested pattern matches are hard to read.