Refactored a  named variable; "directory" is now "path"