#3 validate middleware and accept java middleware
#3 map existing middleware to JS
refactor engine to only have 1 method to implement
#3 refactored the engine API so it is easier to implement engines in other languages than Java
#3 js now support engines, example MicroTemplateEngine