Consolidate variable declarations as a response to jshint errors.

Also, add content type handlers for gif and jpg files.