Move JSON stuff to submodule.
Added workaround for catchall http errorhandling.