More progress on attachment handling.