Refactor servlet to take dependencies as constructor params

Use Map[String, String] for config