Added message handling for blur and focus into app.js.