removes _directory variable
adds locals to variables