Uses json instead of deprecated django.utils.simplejson if possible.

Also cleans up views code for less duplication. Style fixes in urls
module, including removal of needless * imports.