Add actions and fix some bugs in Applications model.