Bit of cleanup and folding