Moved directory into proper scope