I think we should move all this into a new file