Using 'script' and 'scriptcache' modules.  Closes #24
Moves most of the script- and cache-specific stuff out of routes.