fix most servlet issues added three main classes