JSHint checked

Using JSHint  to detect errors and potential problems in app.