remove useless valence fn, move tests, fix set change bug