Clean up layer dumping a bit.