implemented CachingServlet.java and made some more improvements