Added middleware and comments

Added middleware to print out parameters in the url to the console