Changed 'file_loc' function name to 'process_uri' and made other minor changes.