Made function handleRequest anonymous, as it is only called once
in the source code.