Refactoring for usage with new servlet engine architecture