Slight refactor and formatting.
Renamed to created (to avoid confusion with /actual/ starting state, which we currently ignore).
Refactored expunge method to actually work!
Added logic to remove app if we are shutting it down with no tasks.