Add queue purging and refactor saves
Set up offline mode, currently untested