Remove unused functions and add more test coverage

getting a bit picky, I would leave this as a capital `I` as `i` is by 'convention' a loop variable