some code cleaned up, some testing done, web.xml file required