Re-write some of GenerateDLSFromBundle, specifically the bundle resource file opening.
Some code style changes.