Applied refactoring to JSP branch