I think it's better to put code that's largely copy and pasted from elsewhere into it's own file.  And I agree that probably a lot of this code will go away, but it's important to cite and license it correctly.