process attach/detach facilities added, main program skeleton added