Added the ability to track the referer between requests and cleaned up some docstrings