Massive refactor of BindBundleCommand to radically improve code maintainability.

This pull request is probably easier to understand by looking at the resulting code, not the diffs themselves. There is more that can be done to clean up from here, but this is a huge step forward.
My only comment was on it looking funky.<g> A function to create the command object is overkill (and annoying for multiple outputs). I'd suggest no change.