Added generic OnClosed event to application (for plugins).
Added temp folder to defined data paths.