refactoring and jsp changes