Remove redundant legacy code