further refactoring of servlet layer