Feature/json request

The fewer places we refer to super globals the better.