Refactor codes as suggested; Logging for average response time and added
tests for content file retrieval.