EXP: move IP options and clean up code