remove unused code and tests