Adding multidirectory support