Do we need to do this here? Isn't it enough to just export it at the end of the file?