Need to go over the code and refactor to better handle directories, trailing slashes, etc.
Need to go over the code and refactor to better handle directories, trailing slashes, etc.