Enabled visualize command to work on devices.

- Improved version of #18 by @bencochran.
    - Removed _showLocalImage.
    - Merged _showImage and _showRemoteImage.
    - Added error message if attempt to get image data returns nil.
Removed spaces on an empty line.
Added cast to `id` to avoid problems with certain commands.
Merged master into device
Improved indentation.
Merge pull request #36 from antons/device

Enabled visualize command to work on devices