HPCC-9629 New language features to support bundles

More refactoring and cleanup.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>