first pass e2-0040 and other tweaks djb