I would prefer that the environment hash be constructed without having to do post-processing.  I like the previous method better where it constructs the hash in the structure understood by beaker, it makes it clearer what the expectations are and how things are set.  The post processing is difficult to read and comes too close to 'magic'.  Would it be possible to just do the recursive read of the existing environment hash?  Also, this has been back and forth enough that we should probably just talk in person. :)