Remove unused functions and add more test coverage

it doesn't get used anywhere