namespace the showRequest function

and a bit of code cleanup