Fixes for all my mistakes

Fixed the else conditions, cleaned up the json responses, fixed the crazy scan response, and got Widget to work from the require.