Finalize persistence and set up local settings