shadow directory clearing fixes && make shadow dirs for all refs