Changed /stream path to /user/{id}/devices to match specification. Minor indentation changes and name of variables