Some Java changes, added Servlet, split some methods