Remove unused functions
refactor test