Finalize settings code