Preparing for the addition of the file parser for the HTML files - making the top level document more generic and general tidying up.

Also added the "generateResponse" method to the request object.