In getRequestEndpoint(), also added a call to preg_replace to get rid of any file extensions that may have been passed.
Added some and fixed some documentation.