Added settings persistence - fixes #2