Clean up IPv4 options; add tests