refactoring for security
no more exceptions in app.js
everything appears to be working