Add ImageServlet
Remove code duplication