Adding useful methods for converting between DDL and slice/patch. Plus cleaning up...