Remove unused functions and add more test coverage

I would vote for the prefix option