split xvm.ksh, start work on utility functions