* refactor applications.js
* add "install/update/uninstall" events in Application object