Repond to not only HTML but also JSON format
Use consistent naming for the root request handler