Restructure: Return JSON for http error codes.
Restructure: Fix imports on frontend_misc.