Refactor & add tests for eipconfig