Refactored cache into separate module 'cache.js'.
Refactored request processing into separate scope.