code cleanup; removing unused code and their tests