ipsec fixes & other cleanups