Might be nice to rewrite this as a helper and/or generator at the top of the file.