Removing unused code. Related to #3671