Update tests. Remove unused code.