Added version into config, refactor middleware example