Removed unused code, comments and variables. Also, added delegatedClassLoaderMap to handle delegatedClassLoader as per Tomcat.