Added comments to classes and servlets and polished the code.