Clean up settings and change to sqlite