There is a lot of this kind of code in cyclus right now.  Maybe we could make an issue and tackle it later.