prune legacy code