remove legacy code blocks