Added application management

- flush should not be repeated within a short period (function exceptions)
- kill process is not secured yet

Closes #884