misc cleanup & OPENDIR fix