Remove unused functions and add more test coverage

add this one to the doc string as well?